package com.demo.flight.service;

import com.demo.flight.entity.Customer;

import java.util.List;

/**
 * @author ssy
 * @create 2022-03-23 10:14
 */
public interface CustomerService{
    /**
     * 查询满足条件的用户的数量，只能等值查询
     * @param customer
     * @return
     */
    int countByCondition(Customer customer);
    
    /**
     * 获取全部用户
     * @return
     */
    List<Customer> getAll();
    
    /**
     * 获取满足条件的用户，只能等值查询
     * @param customer 符合条件的示例用户
     * @return
     */
    List<Customer> getAllByCondition(Customer customer);
    boolean add(Customer customer);
    boolean delete(Integer customerId);
    boolean update(Customer customer);
    
    /**
     * 检查客户信息完整性
     * @param customer
     * @return
     */
    boolean checkComplement(Customer customer);
    
    /**
     * 检查是否已存在除id外完全相同的客户
     * @param customer
     * @return
     */
    boolean checkIsDuplicated(Customer customer);
}
